using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Service;
using Entity;

namespace WindowsClient
{
    public partial class LoginDialog : Form
    {
        public LoginDialog()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            PartyService partyService = new PartyService();
            Party party = new Party();

            party = partyService.GetParty(txtUsername.Text, txtPassword.Text);

            if (party.ID > 0 )
            {
                MessageBox.Show("Login succesful");
            }
            else
            {
                MessageBox.Show("Login failed");
            }


        }
    }
}